﻿namespace FrontEnd.Views
{
	using System.Diagnostics.Contracts;
	using System.Web.Mvc;
	using System.Web.Mvc.Html;

	public static class ControllerLinkHtmlExtensions
	{
		public static string ActionLink(this HtmlHelper helper, string title, ControllerLinkDefinition linkDefinition)
		{
			CodeContract.Requires(helper != null);
			CodeContract.Requires(linkDefinition != null);
			CodeContract.Requires(linkDefinition.ActionName != null);
			CodeContract.Requires(linkDefinition.ConrollerType != null);

			return helper.ActionLink(title,
				linkDefinition.ActionName, linkDefinition.ConrollerType);
		}
	}
}
